package com.eds.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eds.mapper.OssImageMapper;
import com.eds.service.OssImageService;
import com.pojo.OssImage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 34195
 * @description 针对表【oss_image】的数据库操作Service实现
 * @createDate 2025-03-18 10:11:11
 */
@Service
public class OssImageServiceImpl extends ServiceImpl<OssImageMapper, OssImage>
        implements OssImageService {

    @Autowired
    private OssImageMapper ossImageMapper;


    /* *
     * @Title: getDefaultImage
     * @Author: vvSmile
     * @Date: 2025-03-27 17:25:14
     * @return OssImage
     * @Description: TODO 获取默认照片
     */
    @Override
    public OssImage getDefaultImage() {
        QueryWrapper<OssImage> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("description", "default");
        OssImage defaultImage = ossImageMapper.selectOne(queryWrapper);
        return defaultImage;
    }
}




